const router = require('koa-router')()
const { getCarouselList, queryCarousel, delCarousel, addCarousel, editEcho, editCarousel } = require("../controllers/carouselController")

router.prefix('/carousel')

// 获取轮播图列表
router.get("/list", getCarouselList)
// 通过时间查询轮播图列表
router.get("/query", queryCarousel)
// 通过id删除轮播图
router.delete("/remove", delCarousel)
// 添加轮播图数据
router.post("/add", addCarousel)
// 编辑轮播图回显数据
router.get("/echo", editEcho)
// 编辑用户
router.post("/edit", editCarousel)

module.exports = router